# make branch
git branch -D prepare_public
git branch -D public
git checkout -b prepare_public

# clean
git rm -rf examples
git rm -rf tests
git rm -rf `find -type d -name 'priv'`
git rm `find -name '*-priv.*'`
git rm `find -name '*_priv.*'`
git rm -rf tasks/math_rl_v3/qwen3
git rm -rf tasks/math_rl_v3/llama3
git rm -rf tasks/dpo
sed -i 's/WANDB_BASE_URL=.*/WANDB_BASE_URL=/g' `find -name '*.sh' | grep -v make-pub.sh`
sed -i 's/WANDB_API_KEY=.*/WANDB_API_KEY=/g' `find -name '*.sh' | grep -v make-pub.sh`

# cleanup special
git rm 'docs/source/newbie.md'
sed -i 's/G-Core/YATT/g' README.md
git add .

# new branch
git commit -m 'drop priv code'
git checkout --orphan public
git commit -m 'make public' --author 'mmbaseplt2<mmbaseplt2@tencent.com>'

# push
git remote add txpub git@git.woa.com:wepsdl/gcore.git
git push -f txpub public
git remote add github git@github.com:Tencent/G-Core-GH.git
git push -f github public

git remote remove txpub
git remote remove github
git checkout master
git branch -D prepare_public
git branch -D public
